Simplify capsule local center calculation in movement#601
Simplify capsule local center calculation in movement#601tracygardner wants to merge 1 commit intomainfrom
Conversation
cap.localCenter is always the correct offset from mesh origin to capsule centre. For meshes whose origin sits at the bbox centre (characters, primitives) localCenter is zero, so the result is identical to the old Zero() branch. The name-based character guard was protecting against a case that never occurs. https://claude.ai/code/session_01HKKt5Tdz6MkqcyV8rLPRP2
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesCapsule Center Selection Simplification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Summary
Simplified the capsule local center calculation logic by removing unnecessary character mesh detection and conditional logic.
Key Changes
isCharacterMeshdetection that checked multiple metadata properties and name patterns (including checks for "character" and "liz" in various forms)cap.localCenter || flock.BABYLON.Vector3.Zero()Implementation Details
The previous implementation attempted to differentiate behavior based on whether a model was a character mesh, but this distinction is no longer needed. The simplified approach treats all models uniformly by using the capsule's own local center property when present, which is more maintainable and reduces code complexity.
https://claude.ai/code/session_01HKKt5Tdz6MkqcyV8rLPRP2
Summary by CodeRabbit
Release Notes